package com.celesea.auth.dept.entity;

import com.celesea.framework.entity.BaseEntity;
import com.celesea.framework.util.EnvUtil;
import com.celesea.framework.vo.DictionaryVo;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * @author JackYuan
 * @create 2017-10-28 16:18
 */
@Table(name = "dept_user_mapping")
public class DeptUser extends BaseEntity {
    protected String id;
    @Column(name = "`dept_id`", columnDefinition = "部门Id")
    private String deptId;
    @Column(name = "`dept_name`", columnDefinition = "部门名称")
    private String deptName;
    @Column(name = "`user_id`", columnDefinition = "用户Id")
    private String userId;
    @Column(name = "`user_name`", columnDefinition = "用户名称")
    private String userName;
    @Column(name = "`visible`", columnDefinition = "是否可见：[1：是，0：否]")
    private Byte visible;

    public DeptUser() {
    }

    public DeptUser(Dept dept, DictionaryVo item, Byte visible) {
        super.tenantId= EnvUtil.getTenantId();
        this.deptId = dept.getId();
        this.deptName = dept.getName();
        this.userId = item.getId();
        this.userName = item.getName();
        this.visible = visible;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Byte getVisible() {
        return visible;
    }

    public void setVisible(Byte visible) {
        this.visible = visible;
    }
}
